package com.pro.common.service.model.mapstruct;

import com.pro.common.api.model.ILoginInfo;
import com.pro.common.api.model.IUserClass;
import org.springframework.stereotype.Component;

@Component
public class UserModelMapper {

    public void copy(ILoginInfo user, IUserClass target) {
//        if (target == null) {
//            int i = 0;
//        }
        if (target != null) {
            target.setUserId(user.getId());
            target.setUsername(user.getUsername());
            target.setIsDemo(user.getIsDemo());
        }
    }

    public void copyBean(IUserClass user, IUserClass target) {
//        if (target == null) {
//            int i = 0;
//        }
        if (target != null) {
            target.setUserId(user.getUserId());
            target.setUsername(user.getUsername());
            target.setIsDemo(user.getIsDemo());
        }
    }

}